<?php

namespace app\common\model;

use think\Model;

class SignModel extends Model
{
    protected $name = 'sign';

    public function getSignToDayDataById($where): array
    {
        $t = strtotime(date('Y-m-d',time()));
        return $this->where($where)->where('add_time > '.$t)->findOrEmpty()->toArray();
    }

    public function insertWxData(array $params){
        $this->insert([
            'group_id'=>$params['from_wxid'],
            'uid'=>$params['final_from_wxid'],
            'add_time' => time()
        ]);
    }

}